

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><link href='./home/css/etm.css' rel='stylesheet' type='text/css' /><!--[if IE 8]> <link href='/Themes/Theme3/ie8Fix.css' rel='stylesheet' /> <![endif]-->

    <script src="./home/js/jquery-1.4.2.min.js"></script>
    <script src="./home/js/DatePicker/WdatePicker.js"></script>
    <script src="./home/js/flexigrid.js"></script>
    <script src="./home/js/jQuery.Ex.js"></script>
    <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE"/><script src='./home/js/jquery.nicescroll.min.js' type='text/javascript'></script><script type='text/javascript'>var isEtmClient=false;function ReSizeScrollbar() { if ($('form').getNiceScroll().length > 0) {     $('form').getNiceScroll().onResize();}}function ReSizeFlexgridScrollbar() { if ($('.bDiv').getNiceScroll().length > 0) {     $('.bDiv').getNiceScroll().onResize();}}function InitFlexgridScrollbar(){     $('.bDiv').niceScroll({cursorcolor: '#75A801',zindex:4});}function ReSizenDivScrollbar() { if ($('.flexigrid .nDiv').getNiceScroll().length > 0) {     $('.flexigrid .nDiv').getNiceScroll().onResize();}}function InitnDivScrollbar(){     $('.flexigrid .nDiv').niceScroll({cursorcolor: '#75A801',horizrailenabled:false});}function proxyExecuteFun(funName) {if(funName == undefined || funName==null|| funName.length==0){window.parent.showsending(true, "执行中，请耐心等待");setTimeout(function() { window.parent.showsending(false); }, 5000);return;}  if (window[funName]()) {window.parent.showsending(true, "执行中，请耐心等待");setTimeout(function() { window.parent.showsending(false); }, 5000);return true; } return false; };var _tmpOnSelectedFile = null;function onSelectedFile(fileName, fileUrl, isImg) {   if (_tmpOnSelectedFile != null) {        _tmpOnSelectedFile(fileName, fileUrl, isImg);    }}function showFileList(callback) {   window.parent.showDialog('查看素材库', '/Modules/OA/CMyFileListView.aspx?navId=0199c9ce-ca68-4c42-a2c0-47a8e72bcc81', '900px', '450px');   _tmpOnSelectedFile = callback;}$(function () {if (navigator.userAgent.toLowerCase().indexOf('edge/') != -1) { $('input[type=submit],.tmpSubmitButton').bind({ mouseenter: function () { $(this).addClass('tmpSubmitButton'); $(this).prop('type', 'button'); }, mouseleave: function () { $(this).removeClass('tmpSubmitButton'); $(this).prop('type', 'submit'); }, click: function () { $(this).removeClass('tmpSubmitButton'); $(this).prop('type', 'submit'); } }); }if (window.parent != undefined && window.parent != null && typeof window.parent.showsending != "undefined") { window.parent.showsending(false, ''); }$(".button").each(function() { if ($(this).attr("type") == "submit" &&!$(this).hasClass('noloading') && window.parent != undefined && window.parent != null && typeof window.parent.showsending != "undefined") { var tmpClick = $(this).attr("onclick");if(tmpClick == undefined || tmpClick==null|| tmpClick.length<2){ $(this).attr("onclick","proxyExecuteFun();");return;}  if (tmpClick.indexOf("return ") != -1 && tmpClick.indexOf("(") != -1) { tmpClick = tmpClick.substring(7).replace(/\s+/g, ''); if (tmpClick.indexOf("()") != -1) { var funName = tmpClick.substring(0, tmpClick.indexOf("(")); $(this).attr("onclick","return proxyExecuteFun('" + funName + "');"); } } } });$('body').click(function() {     if (typeof parent.onChildPageClick !='undefined') {         parent.onChildPageClick();     }});     $('form').height($(window).height()-0).niceScroll({cursorcolor: '#75A801',horizrailenabled:false });     $(window).resize(function () {         ReSizeScrollbar();     });});</script>
    <script type="text/javascript">
        function BillDel(purchaseBillGuid) {
            if (confirm('确定要删除此采购单吗？')) {
                $.AjaxETM("PurchaseBillList_Del", { "PurchaseBillGuid": purchaseBillGuid }, function (data) {
                    if (data == "删除成功") {
                        alert(data);
                    }
                    else {
                        alert("删除失败！");
                    }
                }, true, "text");
            }
        }
        function getStatusName(dostatus) {
            var strResult = "";
            switch (dostatus) {
                case "0": strResult = "未审核"; break;
                case "1": strResult = "已审核"; break;
                case "2": strResult = "作废"; break;
                case "3": strResult = "已入库"; break;
            }
            return strResult;
        }
    </script>
</head>
<body>
    <form method="post" action="PurchaseBillList.aspx?navId=0199c9ce-ca68-4c42-a2c0-47a8e72bcc81" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMjgyMjk1MzgxD2QWAgIDD2QWBgIBDxBkEBUICeivt+mAieaLqQnoiJLlpKfms70EZGVtbwbmnY7mooUG57qi6Iy2BuiDoeadpQbog6HplKYGd2FuZG91FQgkMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwJDM4OTEwZmNmLWE5YWYtNDJjMS1iNDUwLTJmMGMzMzRiMjdjZiQzNmJkZWUyMC02MDE2LTRmNGUtYTI5MC01ODJjMTE0M2E1YjckNjU2NzFlNzMtZjlkMC00NTQ1LTkzZmYtOGI4MTdjYWQ4ODBmJGQ2ZmIyODJiLWU0NzItNDQ5Zi1iMmM1LWMyYmM5NWNjNGFiNSQzZWRjOTM5YS0wZTQwLTQwZDAtYTIxMS1mZjdlZDBlNDYyZDgkYmFhYTVhZjUtMDJkOC00NmJlLWI1NGQtZGIyOWVhZWMwOTBkJGM3MTBhMGFlLTFmZGMtNDU4Zi1hNzA1LTY3NjQ4MWRjYjJmMBQrAwhnZ2dnZ2dnZ2RkAgQPEGQQFQUJ6K+36YCJ5oupCeW4guWcuumDqAnmgLvnu4/lip4J6LSi5Yqh6YOoCeaVmeWtpumDqBUFJDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCRlYzNjNTM2NS05Njg2LTQ2NmMtYTUzMi0wZDczZDY5ZjAwNDAkYzZmNTAwNWUtNTU5NS00OTRmLWI2OWEtNzVmY2MxNDM5MGRmJGU1YTMwYjliLWI2MTAtNGE0MC1hNTY4LTkyZmI2Nzk4ZDMxMCRjM2U1MjQ2Mi03ZDJkLTRiMGItYjAwZC01ODZiOTNkNzUxYjYUKwMFZ2dnZ2dkZAIFDxBkEBUICeivt+mAieaLqQnoiJLlpKfms70EZGVtbwbmnY7mooUG57qi6Iy2BuiDoeadpQbog6HplKYGd2FuZG91FQgkMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwJDM4OTEwZmNmLWE5YWYtNDJjMS1iNDUwLTJmMGMzMzRiMjdjZiQzNmJkZWUyMC02MDE2LTRmNGUtYTI5MC01ODJjMTE0M2E1YjckNjU2NzFlNzMtZjlkMC00NTQ1LTkzZmYtOGI4MTdjYWQ4ODBmJGQ2ZmIyODJiLWU0NzItNDQ5Zi1iMmM1LWMyYmM5NWNjNGFiNSQzZWRjOTM5YS0wZTQwLTQwZDAtYTIxMS1mZjdlZDBlNDYyZDgkYmFhYTVhZjUtMDJkOC00NmJlLWI1NGQtZGIyOWVhZWMwOTBkJGM3MTBhMGFlLTFmZGMtNDU4Zi1hNzA1LTY3NjQ4MWRjYjJmMBQrAwhnZ2dnZ2dnZ2RkZJdEF8JPsmVuSDnjp1OzSBwFP0KHPGwkQyNDHVsq+TBZ" />
</div>

<div class="aspNetHidden">

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="37D72520" />
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdACD2kvND65fQaZIJhykfzlH3URxB/SDqXNvh/U4K28rn7iOEDdPMIevAtNeL4lq2Jlri4xnb5c9r+Aq96XpZ8E6rdiIBo5GkujtQOP6MbTF1KTqhrQ28dKNwVjjrCBw+xtP5j9R+06i10u6/mDWyWU4uRVP78R94mcA5FyJoSDtHiYfb9BFJ2+j3cgmlDMDef+r9YAhlDJ6/swE6qEBH8dnyW0pNHd2S98gI96QlRomyBC1H1bpTElLMuHfRhmTIimrDuuNlR5HogbphimlRKUdPhD4yk89T3BcCDwk3Dwb9nbbzDcCJqmqDoRRTCSzdsSTk0ymqgyImwq2mNcYzyjd9b8WhdyvdP569NB5hMhhd85SHsNWZTYvOoQ9DTyWM6XAxX7J+stahkbn8pL1OMb2Z0h7Gb/waWjGsYrVtEti12MAKGvj08LVCRuq2ghdyMvZm0jWjadn0YA2WRgZcyA7ktndqifiLVP318YaAVW+4p2jD34UqgNuQgLKKBHegRCDXzr2/9Lg8dBM9U0HT41rba7PPktfVxvZmG1PhwRhgQR4BqdOThElB0NdgWzjuspiTXELZyrW99YRLW0+m1iffNtHiu+wxq/6TvK+ZNl2iS/jrd+6AhBFz9xIwRXGyYSj+pP5lUtSqBf5Xlf7wu28D5VQbAjw+rY/bD8adpJeHdsiG/yJwKtmDAcIPEsgvacwDdnyvsw31dTPTyFCnDyBR" />
</div>
        <table class="search">
            <tr>
                <td class="textAlignRight" style="width: 78px;">采购单号：
                </td>
                <td class="borderRight" style="width: 160px;">
                    <input name="txtBillNo" type="text" id="txtBillNo" class="int" style="width:140px;" />
                </td>
                <td class="textAlignRight" style="width: 66px;">创建人：
                </td>
                <td class="borderRight" style="width: 160px;">
                    <select name="ddlCreatorUser" id="ddlCreatorUser" class="int">
	<option value="00000000-0000-0000-0000-000000000000">请选择</option>
	<option value="38910fcf-a9af-42c1-b450-2f0c334b27cf">舒大泽</option>
	<option value="36bdee20-6016-4f4e-a290-582c1143a5b7">demo</option>
	<option value="65671e73-f9d0-4545-93ff-8b817cad880f">李梅</option>
	<option value="d6fb282b-e472-449f-b2c5-c2bc95cc4ab5">红茶</option>
	<option value="3edc939a-0e40-40d0-a211-ff7ed0e462d8">胡来</option>
	<option value="baaa5af5-02d8-46be-b54d-db29eaec090d">胡锦</option>
	<option value="c710a0ae-1fdc-458f-a705-676481dcb2f0">wandou</option>

</select>
                </td>
                <td class="textAlignRight" style="width: 78px;">创建日期：
                </td>
                <td class="borderRight" style="width: 172px;">
                    <input name="txtStartCreateTime" type="text" id="txtStartCreateTime" class="int" onfocus="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;})" style="width:70px;" />
                    -
                    <input name="txtEndCreateTime" type="text" id="txtEndCreateTime" class="int" onfocus="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;})" style="width:70px;" />
                </td>
                <td rowspan="2" style="padding-left: 20px;">
                    <input type="button" class="button" value="搜 索" id="btnSearch" />
                </td>
            </tr>
            <tr>
                <td class="textAlignRight">申购部门：
                </td>
                <td class="borderRight">
                    <select name="ddlDepartment" id="ddlDepartment" class="int">
	<option value="00000000-0000-0000-0000-000000000000">请选择</option>
	<option value="ec3c5365-9686-466c-a532-0d73d69f0040">市场部</option>
	<option value="c6f5005e-5595-494f-b69a-75fcc14390df">总经办</option>
	<option value="e5a30b9b-b610-4a40-a568-92fb6798d310">财务部</option>
	<option value="c3e52462-7d2d-4b0b-b00d-586b93d751b6">教学部</option>

</select>

                </td>

                <td class="textAlignRight">申购人：
                </td>
                <td class="borderRight">
                    <select name="ddlBuyUser" id="ddlBuyUser" class="int" style="width:142px;">
	<option value="00000000-0000-0000-0000-000000000000">请选择</option>
	<option value="38910fcf-a9af-42c1-b450-2f0c334b27cf">舒大泽</option>
	<option value="36bdee20-6016-4f4e-a290-582c1143a5b7">demo</option>
	<option value="65671e73-f9d0-4545-93ff-8b817cad880f">李梅</option>
	<option value="d6fb282b-e472-449f-b2c5-c2bc95cc4ab5">红茶</option>
	<option value="3edc939a-0e40-40d0-a211-ff7ed0e462d8">胡来</option>
	<option value="baaa5af5-02d8-46be-b54d-db29eaec090d">胡锦</option>
	<option value="c710a0ae-1fdc-458f-a705-676481dcb2f0">wandou</option>

</select>

                </td>
                <td class="textAlignRight">申购日期：
                </td>
                <td class="borderRight">
                    <input name="txtStartBuyDate" type="text" id="txtStartBuyDate" class="int" onfocus="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;})" style="width: 70px" />
                    -
                    <input name="txtEndBuyDate" type="text" id="txtEndBuyDate" class="int" onfocus="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;})" style="width: 70px" />
                </td>

            </tr>
        </table>
        <table id='Test' style='display:none;'></table><input type='text' style='display:none;' id='etmparams' name='etmparams' value='[{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"","Name":"PurchaseBillGuid","Width":35,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":true,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":"DoStatus","IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":"BtnSelect","Display":"操作","Name":"PurchaseBillGuid,DoStatus,,0199c9ce-ca68-4c42-a2c0-47a8e72bcc81,0","Width":120,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":"BtnBillNo","Display":"采购单号","Name":"billNo,PurchaseBillGuid,,0199c9ce-ca68-4c42-a2c0-47a8e72bcc81","Width":101,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"总金额","Name":"Amount","Width":60,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"right","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"申购人","Name":"BuyUserName","Width":80,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"申购部门","Name":"DepartmentName","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":"yyyy-MM-dd","ColumnType":"DateTime","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"申购日期","Name":"BuyDate","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"审批人","Name":"CheckUserName","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":"yyyy-MM-dd","ColumnType":"DateTime","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"审批日期","Name":"CheckTime","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"创建人","Name":"CreatorName","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":"yyyy-MM-dd","ColumnType":"DateTime","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"创建日期","Name":"CreateTime","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"状态","Name":"DoStatus","Width":60,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false}]'/><input type='text' style='display:none;' id='etmUrlparams' name='etmUrlparams' value='[{"Key":"navId","Value":"0199c9ce-ca68-4c42-a2c0-47a8e72bcc81"}]'/><input type='text' style='display:none;' id='etmPageUrl' name='etmPageUrl' value='http://vip.yj.etmcn.com/Modules/Asset/PurchaseBillList.aspx?navId=0199c9ce-ca68-4c42-a2c0-47a8e72bcc81'/><input type='text' style='display:none;' id='pagename' name='pagename' value='PurchaseBillList'/><input type='text' style='display:none;' id='pageamethod' name='pageamethod' value='PurchaseBillListPurchaseBillList'/><script type='text/javascript'> var etmFormId='form1';function fixIE9() {if ($.browser.msie && $.browser.version == 9) {$('#form1 select').each(function () {var name = $(this).attr('name');if (name != undefined && name.length > 0) {var value = $(this).val();if (value == null) {value = $(this).find('option:first').attr('value');$(this).val(value);}}});}}function RefreshGrid(){ $('#Test').flexOptions().flexReload(); };function addFormData() {fixIE9(); var dt = $('#form1').serializeArray(); $('#Test').flexOptions({ params: dt }); return true; }$(function () { $('#btnSearch').click(function () { $('#Test').flexOptions({ newp: 1 }).flexReload(); return false; }); });$('#Test').flexigrid({url: './data/zcCggl.json',sortname: 'BillNo',sortorder: 'asc',usepager: true,useRp: true,rpOptions: [20,30,50,100,200],rp: 30,colModel: [{ display: '', name: 'PurchaseBillGuid',etmname:'PurchaseBillGuid', width: 35, sortable: false, align: 'Center', checkbox: true ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '操作', name: 'PurchaseBillGuid,DoStatus,,0199c9ce-ca68-4c42-a2c0-47a8e72bcc81,0',etmname:'BtnSelect', width: 120, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '采购单号', name: 'billNo,PurchaseBillGuid,,0199c9ce-ca68-4c42-a2c0-47a8e72bcc81',etmname:'BtnBillNo', width: 101, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '总金额', name: 'Amount',etmname:'Amount', width: 60, sortable: false, align: 'right', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '申购人', name: 'BuyUserName',etmname:'BuyUserName', width: 80, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '申购部门', name: 'DepartmentName',etmname:'DepartmentName', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '申购日期', name: 'BuyDate',etmname:'BuyDate', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'yyyy-MM-dd',ColumnType:'DateTime',IsJsAddColumn:false},{ display: '审批人', name: 'CheckUserName',etmname:'CheckUserName', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '审批日期', name: 'CheckTime',etmname:'CheckTime', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'yyyy-MM-dd',ColumnType:'DateTime',IsJsAddColumn:false},{ display: '创建人', name: 'CreatorName',etmname:'CreatorName', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '创建日期', name: 'CreateTime',etmname:'CreateTime', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'yyyy-MM-dd',ColumnType:'DateTime',IsJsAddColumn:false},{ display: '状态', name: 'DoStatus',etmname:'DoStatus', width: 60, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false}],width: $(window).width(),height: $(window).height()-242+60,onSubmit: addFormData});</script>
        <div style="margin-left: 20px;"> <input type="submit" name="btnAdd" value="添加" onclick="return false;" id="btnAdd" class="button" />
                        &nbsp;&nbsp;
            <input type="submit" name="btnBatchDel" value="批量删除" onclick="return false;" id="btnBatchDel" class="button" />
                        &nbsp;&nbsp;
            <input type="submit" name="btnCancel" value="作废" onclick="return false;" id="btnCancel" class="button" />
                        &nbsp;&nbsp;
            <input type="submit" name="btnCheck" value="审批" onclick="return false;" id="btnCheck" class="button" />
                        &nbsp;&nbsp;
             <input type="submit" name="btnUnCheck" value="反审批" onclick="return false;" id="btnUnCheck" class="button" /></div>
        <script type="text/javascript">
            function CheckPurchaseBill(PurchaseBillGuid) {
                if (confirm("确定要审批吗？")) {
                    $.AjaxETM("BillCheck", { "purchaseBillGuid": PurchaseBillGuid },
                                function (data) {
                                    alert(data);
                                }, true, "text");
                }
            }
            function UnCheckPurchaseBill(PurchaseBillGuid) {
                if (confirm("确定要反审批吗？")) {
                    $.AjaxETM("BillUnCheck", { "purchaseBillGuid": PurchaseBillGuid },
                                function (data) {
                                    alert(data);
                                }, true, "text");
                }
            }
            function Delete(PurchaseBillGuid) {
                if (confirm("确实要删除吗？")) {
                    $.AjaxETM("PurchaseBillList_Del", { "PurchaseBillGuid": test[i].replace(/^\"|\"$/g, ''), "count": count, "counts": counts },
                       function (data) {
                           alert(data);
                       },
                        true, "text");
                }
            }
        </script>
        <script type="text/javascript">
            $(function () {
                $("#btnAdd").live("click", function () {
                    window.parent.showDialog("添加采购", "../Modules/Asset/PurchaseBillEdit.aspx?sc=btn&navId=0199c9ce-ca68-4c42-a2c0-47a8e72bcc81", "900px", "470px");
                   // window.location.href = "PurchaseBillEdit.aspx?sc=btn&navId=0199c9ce-ca68-4c42-a2c0-47a8e72bcc81";
                });
                $("#btnBatchDel").live("click", function () {
                    //0 未审批 1 已审批 2 已作废 3 已入库 
                    var purchaseBillGuid = "";
                    var count = 0;
                    var dostauts = "";
                    var errorString = "";
                    $("input[name='selectItem']:checkbox:checked").each(function () {
                        purchaseBillGuid = $(this).val() + ",";
                        dostauts = $(this).parent().parent().attr("dostatus");
                        count += 1;
                        if (dostauts == "1") {
                            errorString = "选择项里存在已审核的采购单，无法删除。";
                            return;
                        }
                        else if (dostauts == "3") {
                            errorString = "选择项里存在已入库的采购单，无法删除。";
                            return;
                        }
                    });
                    if (count == 0) {
                        alert("请选择数据");
                        return false;
                    }
                    if (errorString != "") {
                        alert(errorString);
                        return false;
                    }

                    if (confirm("确定要删除吗？")) {
                        $.AjaxETM("PurchaseBillDel_More", { "PurchaseBillGuid": purchaseBillGuid },
                           function (data) {
                               alert(data);
                           },
                            true, "text");
                    }
                });
                $("#btnCancel").live("click", function () {
                    //0 未审批 1 已审批 2 已作废 3 已入库 
                    var purchaseBillGuid = "";
                    var count = 0;
                    var dostauts = "";
                    var errorString = "";
                    $("input[name='selectItem']:checkbox:checked").each(function () {
                        purchaseBillGuid = $(this).val() + ",";
                        dostauts = $(this).parent().parent().attr("dostatus");
                        count += 1;
                        if (dostauts == "0") {
                            errorString = "选择项里存在未审核的采购单，无需作废。";
                            return;
                        }
                        else if (dostauts == "1") {
                            errorString = "选择项里存在已审核的采购单，无法作废。";
                            return;
                        }
                        else if (dostauts == "2") {
                            errorString = "选择项里存在已作废的采购单，无需作废。";
                            return;
                        }
                    });
                    if (count == 0) {
                        alert("请选择数据");
                        return false;
                    }
                    if (errorString != "") {
                        alert(errorString);
                        return false;
                    }
                 
                    if (confirm("确定要作废吗？")) {
                        $.AjaxETM("BillCancel_More", { "PurchaseBillGuid": purchaseBillGuid },
                           function (data) {
                               alert(data);
                           },
                            true, "text");
                    }
                });
                $("#btnCheck").live("click", function () {
                    //0 未审批 1 已审批 2 已作废 3 已入库 
                    var purchaseBillGuid = "";
                    var count = 0;
                    var dostauts = "";
                    var errorString = "";
                    $("input[name='selectItem']:checkbox:checked").each(function () {
                         purchaseBillGuid = $(this).val() + ",";
                        dostauts = $(this).parent().parent().attr("dostatus");
                        count += 1;
                        if (dostauts == "1") {
                            errorString = "选择项里存在已审批的采购单，无需审批。";
                            return;
                        }
                        else if (dostauts == "2") {
                            errorString = "选择项里存在已作废的采购单，无法审批。";
                            return;
                        }
                        else if (dostauts == "3") {
                            errorString = "选择项里存在已入库的采购单，无法审批。";
                            return;
                        }
                    });
                    if (count == 0) {
                        alert("请选择数据");
                        return false;
                    }
                    if (errorString != "") {
                        alert(errorString);
                        return false;
                    }

                    if (confirm("确定要审批吗？")) {
                        $.AjaxETM("BillCheck_More", { "purchaseBillGuid": purchaseBillGuid },
                        function (data) {
                            alert(data);
                        },
                         true, "text");
                    }
                });
                $("#btnUnCheck").live("click", function () {
                    //0 未审批 1 已审批 2 已作废 3 已入库 
                    var purchaseBillGuid = "";
                    var count = 0;
                    var dostauts = "";
                    var errorString = "";
                    $("input[name='selectItem']:checkbox:checked").each(function () {
                         purchaseBillGuid = $(this).val() + ",";
                        dostauts = $(this).parent().parent().attr("dostatus");
                        count += 1;
                        if (dostauts == "0") {
                            errorString = "选择项里存在未审批的采购单，无需反审批。";
                            return;
                        }
                        else if (dostauts == "2") {
                            errorString = "选择项里存在已作废的采购单，无法反审批。";
                            return;
                        }
                        else if (dostauts == "3") {
                            errorString = "选择项里存在已入库的采购单，无法反审批。";
                            return;
                        }
                    });
                    if (count == 0) {
                        alert("请选择数据");
                        return false;
                    }
                    if (errorString != "") {
                        alert(errorString);
                        return false;
                    }

                    if (confirm("确定要反审批吗？")) {
                        $.AjaxETM("BillUnCheck_More", { "purchaseBillGuid": purchaseBillGuid },
                        function (data) {
                            alert(data);
                        },
                         true, "text");
                    }
                });
            });
        </script>
    </form>
</body>
</html>
